<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 常量 不允许更改
        const PI = 3.14;
        console.log(PI);
        /* 
            会报错：
                Uncaught TypeError: Assignment to constant variable.
        */
        // PI = 3.15;
        // console.log(PI);

        // 常量声明的时候必须赋值
        /* 
            会报错：
                Uncaught SyntaxError: Missing initializer in const declaration
        */
        // const M;
    </script>
</body>
</html>